<?php

namespace common\models\cms;

use Yii;

/**
 * This is the model class for table "{{%cms_tag}}".
 *
 * @property int $id
 * @property string $name 标签名称
 * @property int $admin_id 创建人ID
 * @property int $created_at
 * @property int $updated_at
 * @property int $deleted_at
 * @property int $status 状态
 */
class CmsTag extends \common\db\ActiveRecord {

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%cms_tag}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['name'], 'required'],
            [['admin_id', 'created_at', 'updated_at', 'deleted_at', 'status'], 'integer'],
            [['name'], 'string', 'max' => 50],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'name' => '标签名称',
            'admin_id' => '创建人ID',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'deleted_at' => 'Deleted At',
            'status' => '状态',
        ];
    }

}
